Purely Functional Monadic Scheme
نویسنده
چکیده
This paper describes a purely functional dialect of the algorithmic programming language Scheme. Mutable variables, assignment operations and impure control operations (call-with-current-continuation) have been omitted, while side effecting input and output operations are incorporated into the purely functional language using monads, similar to the approach taken in the lazy programming language Haskell.
منابع مشابه
Fold-unfold Transformations on State Monadic Interpreters
In this paper we advocate the use of fold-unfold transformations for mastering the complexity of abstract machines intended for real implementations. The idea is to express the abstract machine as an interpreter in a purely functional language. The initial interpreter should bèobviously correct' (but might be ineecient { we don't care at this point). Fold-unfold transformations are then used to...
متن کاملSide-effect localization for lazy, purely functional languages via aspects
Many side-effecting programming activities, such as profiling and tracing, can be formulated as crosscutting concerns and be framed as side-effecting aspects in the aspect-oriented programming paradigm. The benefit gained from this separation of concerns is particularly evident in purely functional programming, as adding such aspects using techniques such as monadification will generally lead t...
متن کاملConcurrent Monadic Interfacing
In this paper we present the Brisk 1 monadic framework, in which the usual monadic style of interfacing is adapted to accommodate a deterministic form of concurrency. Its main innovation is to allow actions on state components. This is a key issue which enables state splitting, a technique which assigns to each new thread a part of the state, a substate, to act upon. Distinct concurrent threads...
متن کاملPromotional Transformation on Monadic Programs
Monads, proposed by Moggi [16] of their use in structuring denotational descriptions and then popularized by Wadler[21], are becoming an increasingly important tool for structural functional programming[8, 10, 11]. The reason is that monads provide a uniform framework for describing a wide range of programming language features including, for example, state, I/O, continuations, exceptions, pars...
متن کاملEfficient Monadic Streams
Functional stream representations allow for a high-level, compositional way of programming digital signal processing algorithms. However, some algorithms, such as filters, cannot be efficiently implemented using purely functional techniques, due to excessive copying of data. We present a monadic representation of stream which introduces the ability to use mutation for efficiency when implementi...
متن کامل